package de.koller.rRender;

import de.koller.rRender.convert.Convert;
import de.koller.rRender.szene.IGenerate;
import de.koller.rRender.szene.simple.MoveTest;

public class RStart {
	
	public static void main( String[] args ) {
		RStartDialog comp = new RStartDialog();
		IGenerate g = new MoveTest();
		Convert c = new Convert( g, 1 );
		
		comp.setVisible( true );
		
		long startTime = System.currentTimeMillis();
		
		final int frames = 2*25;
		comp.progress.setMinimum( 0 );
		comp.progress.setMaximum( frames );
		for( int i = 0; i < frames; i++ ) {
			long currTime = System.currentTimeMillis();
			
			long est = (currTime - startTime) / (i+1) * frames + startTime;
			long todo = est-currTime;
			
			comp.progress.setValue( i );
			comp.progress.setString( i + " / " + frames + " (" + (todo/1000) + " sec)");
			c.melt( i );
			System.out.println( i + " / " + frames );
		}
		
		comp.dispose();
	}
	
}
